home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
TurboTCP 1.0.1
/
TurboTCP.source
/
CTCPAsyncCall.h
< prev
next >
Wrap
Text File
|
1993-12-10
|
2KB
|
72 lines
/*
** CTCPAsyncCall.h
**
** TurboTCP support library
** TCP asynchronous call class
**
** Copyright © 1993, FrostByte Design / Eric Scouten
**
*/
#pragma once
#ifndef TurboTCPHeaders
#include <CObject.h>
#include <TCPPB.h>
#include "TurboTCP.const.h"
#endif
CLASS CTCPStream;
/*______________________________________________________________________
**
** CTCPAsyncCall
**
** This object encapsulates each asynchronous call to MacTCP. This method is used so that
** the call’s I/O block may persist beyond the scope of the method call which originates the
** call (these methods are located in CTCPStream).
**
** NOTE: All interaction with CTCPAsyncCalls should be through CTCPStream. No other class
** should have a reason to use this object, nor should this object be subclassed.
**
*/
class CTCPAsyncCall : public CObject {
private:
CTCPStream *itsStream; // the stream that requested this call
TurboTCPQElem qEntry; // completion queue handling
TCPiopb itsParamBlock; // the parameter block
CObject *bypassTarget; // who to call on receive-bypass procedure
RcvBypassProc bypassProc;
// initialize/destroy call object
public:
void ITCPAsyncCall (CTCPStream *theStream);
OSErr DoAsyncCall (short theCsCode, TCPiopb *theParamBlockPtr);
// process TCP call completion
void ProcessCompletion (void);
protected:
Boolean Dispatch (void);
Boolean DispatchNoCopyRcv (void);
// bypass procedure linkage
public:
void SetRcvBypassProc (CObject *aRcvBypassTarget, RcvBypassProc aRcvBypassProc);
// completion procedure
private:
static pascal void CompletionProc (void);
};